package org.lq.ht.service.impl;

import java.util.List;

import org.lq.ht.dao.impl.GoodsDaoImpl;
import org.lq.ht.entity.Goods;
import org.lq.ht.service.GoodsService;
/**
 * 商品业务层实现
 * @author 张冲
 * @qq2865346830
 * @package org.lq.ht.service.impl
 * @date 2020年8月21日下午7:59:07
 */
public class GoodsServiceImpl implements GoodsService{
	GoodsDaoImpl gd = new GoodsDaoImpl();
	@Override
	public boolean saveGoods(Goods t) {
		
		return gd.save(t)>0;
	}

	@Override
	public boolean updateGoods(Goods t) {
		// TODO Auto-generated method stub
		return gd.update(t)>0;
	}

	@Override
	public boolean deleteGoodsById(int id) {
		// TODO Auto-generated method stub
		return gd.delete(id)>0;
	}

	@Override
	public List<Goods> findAll() {
		// TODO Auto-generated method stub
		return gd.findAll();
	}

	@Override
	public Goods getById(int id) {
		// TODO Auto-generated method stub
		return gd.getById(id);
	}
	

}
